<table width="100%" border="1" cellspacing="0" cellpadding="0">
	<thead>
		<tr align="center">
			<th bgcolor="<?php echo $cor_cabecalho;?>" colspan="<?php echo count($cabecalhos);?>"><strong><?php echo utf8_decode($titulo);?></strong></th>
		</tr>
		<tr align="center">
<?php
foreach ((array)$cabecalhos as $cabecalho) {
?>
			<th bgcolor="<?php echo $cor_cabecalho;?>"><strong><?php echo utf8_decode($cabecalho);?></strong></th>
<?php
}
?>                        
		</tr>
	</thead>
	<tbody>
<?php
foreach ((array)$rs as $registro) {
?>
                    <tr>
<?php
	foreach ((array)$cabecalhos as $campo => $cabecalho) {
		$valor = $registro[$campo];
?>
				<td><?php echo utf8_decode($valor);?></td>
<?php
	}
?>                        
                    </tr>
<?php
}
?>
	</tbody>
	<tfoot>
		<tr align="center">
			<td bgcolor="<?php echo $cor_cabecalho;?>" colspan="<?php echo count($cabecalhos);?>"><strong>Total de registros: <?php echo count($rs);?></strong></td>
		</tr>
	</tfoot>
</table>
<br />